import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {MainComponent} from "./main.component";
import {IndexComponent} from "../index/index.component";
import {SustainabilityComponent} from "../sustainability/sustainability.component";
import {EnergyComponent} from "../energy/energy.component";
import {AirComponent} from "../air/air.component";
import {NonprofitComponent} from "../nonprofit/nonprofit.component";
import {CreComponent} from "../cre/cre.component";
import {HotelsComponent} from "../hotels/hotels.component";
import {MarineComponent} from "../marine/marine.component";
import {FoodComponent} from "../food/food.component";

const routes: Routes = [
  {
    path: '', component: MainComponent, data: {title: 'main', animation: true},
    children: [
      {path: 'index', component: IndexComponent, data: {title: 'index', animation: true}},
      {path: 'sustainability', component: SustainabilityComponent, data: {title: 'sustainability', animation: true}},
      {path: 'energy', component: EnergyComponent, data: {title: 'energy', animation: true}},
      {path: 'air', component: AirComponent, data: {title: 'energy', animation: true}},
      {path: 'nonprofit', component: NonprofitComponent, data: {title: 'nonprofit', animation: true}},
      {path: 'cre', component: CreComponent, data: {title: 'cre', animation: true}},
      {path: 'hotels', component: HotelsComponent, data: {title: 'hotels', animation: true}},
      {path: 'marine', component: MarineComponent, data: {title: 'marine', animation: true}},
      {path: 'food', component: FoodComponent, data: {title: 'food', animation: true}},
    ]
  },
  // {path: '**', redirectTo: '', pathMatch: 'full'},
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class MainRoutingModule {
}
